package com.gc.ykqx.service.entity;

import java.util.List;

/**
 * Created by WSD on 2017/10/15.
 */

public class Past24 {

    /**
     * returnCode : 0
     * returnMessage : Query Succeed
     * rowCount : 24
     * colCount : 5
     * DS : [{"precipitation":"5.9","dryBulTemp":"17.5","observTimes":"20171015180000","windVelocity":"1.0","stationId":"58643"},{"precipitation":"0.6","dryBulTemp":"17.7","observTimes":"20171015170000","windVelocity":"1.0","stationId":"58643"},{"precipitation":"0.7","dryBulTemp":"17.9","observTimes":"20171015160000","windVelocity":"1.2","stationId":"58643"},{"precipitation":"0.4","dryBulTemp":"17.9","observTimes":"20171015150000","windVelocity":"0.9","stationId":"58643"},{"precipitation":"1.0","dryBulTemp":"17.6","observTimes":"20171015140000","windVelocity":"1.4","stationId":"58643"},{"precipitation":"2.7","dryBulTemp":"17.2","observTimes":"20171015130000","windVelocity":"1.1","stationId":"58643"},{"precipitation":"4.5","dryBulTemp":"17.0","observTimes":"20171015120000","windVelocity":"1.0","stationId":"58643"},{"precipitation":"5.2","dryBulTemp":"16.7","observTimes":"20171015110000","windVelocity":"1.0","stationId":"58643"},{"precipitation":"0.3","dryBulTemp":"16.3","observTimes":"20171015100000","windVelocity":"1.2","stationId":"58643"},{"precipitation":"0.4","dryBulTemp":"15.9","observTimes":"20171015090000","windVelocity":"1.5","stationId":"58643"},{"precipitation":"0.2","dryBulTemp":"15.6","observTimes":"20171015080000","windVelocity":"0.9","stationId":"58643"},{"precipitation":"0.6","dryBulTemp":"15.2","observTimes":"20171015070000","windVelocity":"1.5","stationId":"58643"},{"precipitation":"0.2","dryBulTemp":"15.2","observTimes":"20171015060000","windVelocity":"1.1","stationId":"58643"},{"precipitation":"0.9","dryBulTemp":"15.2","observTimes":"20171015050000","windVelocity":"1.2","stationId":"58643"},{"precipitation":"0.6","dryBulTemp":"15.2","observTimes":"20171015040000","windVelocity":"1.1","stationId":"58643"},{"precipitation":"0.3","dryBulTemp":"15.3","observTimes":"20171015030000","windVelocity":"0.6","stationId":"58643"},{"precipitation":"0.0","dryBulTemp":"15.5","observTimes":"20171015020000","windVelocity":"1.2","stationId":"58643"},{"precipitation":"0.0","dryBulTemp":"15.8","observTimes":"20171015010000","windVelocity":"0.8","stationId":"58643"},{"precipitation":"0.2","dryBulTemp":"16.1","observTimes":"20171015000000","windVelocity":"1.1","stationId":"58643"},{"precipitation":"0.0","dryBulTemp":"16.4","observTimes":"20171014230000","windVelocity":"0.6","stationId":"58643"},{"precipitation":"0.0","dryBulTemp":"16.5","observTimes":"20171014220000","windVelocity":"1.8","stationId":"58643"},{"precipitation":"0.0","dryBulTemp":"16.7","observTimes":"20171014210000","windVelocity":"1.7","stationId":"58643"},{"precipitation":"0.1","dryBulTemp":"17.4","observTimes":"20171014200000","windVelocity":"2.9","stationId":"58643"},{"precipitation":"0.5","dryBulTemp":"17.1","observTimes":"20171014190000","windVelocity":"0.3","stationId":"58643"}]
     */

    private int returnCode;
    private String returnMessage;
    private int rowCount;
    private int colCount;
    private List<DSBean> DS;

    public int getReturnCode() {
        return returnCode;
    }

    public void setReturnCode(int returnCode) {
        this.returnCode = returnCode;
    }

    public String getReturnMessage() {
        return returnMessage;
    }

    public void setReturnMessage(String returnMessage) {
        this.returnMessage = returnMessage;
    }

    public int getRowCount() {
        return rowCount;
    }

    public void setRowCount(int rowCount) {
        this.rowCount = rowCount;
    }

    public int getColCount() {
        return colCount;
    }

    public void setColCount(int colCount) {
        this.colCount = colCount;
    }

    public List<DSBean> getDS() {
        return DS;
    }

    public void setDS(List<DSBean> DS) {
        this.DS = DS;
    }

    public static class DSBean {
        /**
         * precipitation : 5.9
         * dryBulTemp : 17.5
         * observTimes : 20171015180000
         * windVelocity : 1.0
         * stationId : 58643
         */

        private String precipitation;
        private String dryBulTemp;
        private String observTimes;
        private String windVelocity;
        private String stationId;

        public String getPrecipitation() {
            return precipitation;
        }

        public void setPrecipitation(String precipitation) {
            this.precipitation = precipitation;
        }

        public String getDryBulTemp() {
            return dryBulTemp;
        }

        public void setDryBulTemp(String dryBulTemp) {
            this.dryBulTemp = dryBulTemp;
        }

        public String getObservTimes() {
            return observTimes;
        }

        public void setObservTimes(String observTimes) {
            this.observTimes = observTimes;
        }

        public String getWindVelocity() {
            return windVelocity;
        }

        public void setWindVelocity(String windVelocity) {
            this.windVelocity = windVelocity;
        }

        public String getStationId() {
            return stationId;
        }

        public void setStationId(String stationId) {
            this.stationId = stationId;
        }
    }

    @Override
    public String toString() {
        StringBuffer sb = new StringBuffer();
        for (Past24.DSBean ds : DS) {
            sb.append("站号:").append(ds.stationId + " ").append("温度:").append(ds.dryBulTemp + " ")
                    .append("降水:").append(ds.precipitation).append("风速:").append(ds.windVelocity + " ").append("/n");
        }
        return sb.toString();
    }
}
